@echo off
cd /d %~dp0

REM Create and activate virtual environment
if not exist ".venv" (
    python -m venv .venv
)
call .venv\Scripts\activate.bat

REM Set environment variables
set ALPHA_LEVEL=0.05
set PLOT_DIR=./plots

REM Install dependencies (run manually when requirements change)
pip install --only-binary=:all: -r requirements.txt

REM Download NLTK data
REM SET NLTK_DATA=%USERPROFILE%\AppData\Roaming\nltk_data
REM python -m nltk.downloader punkt -q --dir %NLTK_DATA% --url https://mirrors.tuna.tsinghua.edu.cn/nltk_data/

REM Start server
python -m uvicorn main:app --host 0.0.0.0 --port 8036

pause